package com.zmn.plat.model.entity.category;

import java.util.Date;
import java.util.Objects;

/**
 * @author duanzuocai
 * @version v1.0
 * @since 2018/10/19 9:27
 * @类说明：一二级分类表，产品分类数据表
 * @modifier linfeng 新增前后台类型字段 20190920
 */
public class BaseCategory {
    private int categId;

    /**
     * 产品分类 1 后端产品 2前端产品
     */
    private Integer showType;

    /**
     * 名称，比如：电视、空调、冰箱、清洗
     */
    private String name;

    /**
     *
     * 拼音首字母
     */
    private String firstLetter;


    /**
     * 分类名称简拼
     */
    private String simpleSpell;

    /**
     * 父分类名称
     */
    private String parentName;
    /**
     * 父分类ID，1级分类的父ID统一为1
     */
    private Integer parentId;
    /**
     * 级别，目前只有2个级别：1一级；2二级
     */
    private Integer level;
    /**
     * 排序号，编号越小越靠前
     */
    private Integer sort;
    /**
     * 状态：1停用，2启用
     */
    private Integer status;
    /**
     * 前台产品二级分类icon
     */
    private String icon;

    /**
     * 详情页名称
     */
    private String detailName;

    /**
     * 计价器名称
     */
    private String tariffName;
    /**
     * 计价器状态
     */
    private Integer tariffStatus;

    /**
     * 服务时长，单位分钟
     */
    private Integer serviceMinutes;

    private String creater;
    private String updater;
    private Date createTime;
    private Date updateTime;

    public BaseCategory(){super();}
    public BaseCategory(int categId){
        this.categId = categId;
    }


    public int getCategId() {
        return categId;
    }

    public void setCategId(int categId) {
        this.categId = categId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }

    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public String getFirstLetter() {
        return firstLetter;
    }

    public void setFirstLetter(String firstLetter) {
        this.firstLetter = firstLetter;
    }

    public Integer getShowType() {
        return showType;
    }

    public void setShowType(Integer showType) {
        this.showType = showType;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getDetailName() {
        return detailName;
    }

    public void setDetailName(String detailName) {
        this.detailName = detailName;
    }

    public String getTariffName() {
        return tariffName;
    }

    public void setTariffName(String tariffName) {
        this.tariffName = tariffName;
    }

    public Integer getTariffStatus() {
        return tariffStatus;
    }

    public void setTariffStatus(Integer tariffStatus) {
        this.tariffStatus = tariffStatus;
    }

    public Integer getServiceMinutes() {
        return serviceMinutes;
    }

    public void setServiceMinutes(Integer serviceMinutes) {
        this.serviceMinutes = serviceMinutes;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {return true;}
        if (!(o instanceof BaseCategory)) {return false;}
        BaseCategory that = (BaseCategory) o;
        return Objects.equals(name, that.name) &&
                Objects.equals(parentId, that.parentId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, parentId);
    }

    public String getSimpleSpell() {
        return simpleSpell;
    }

    public void setSimpleSpell(String simpleSpell) {
        this.simpleSpell = simpleSpell;
    }
}
